package org.hitchhike.core.repository;

import java.util.List;

import org.hitchhike.common.repository.BaseRepository;
import org.hitchhike.core.domain.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.query.Param;

public interface UserRepository extends BaseRepository<User, Long> {

  User findByUsername(@Param("username") String username);

  List<User> findByUserType(@Param("userType") int userType);

  Page<User> findPageByUserType(@Param("userType") Integer userType, Pageable pageable);
}
